<?php
include($_SERVER['DOCUMENT_ROOT']."/config.php");
include($gDOCUMENT_ROOT_SYSTEM.'templates/include/lib.php');
include($gDOCUMENT_ROOT_SYSTEM.'templates/include/addon.php');
include($gDOCUMENT_ROOT_SYSTEM.'/written_language/check_written_language.php');
include_once($gDOCUMENT_ROOT_SYSTEM.'/check_promulgator.php');
if(!$userAction->canIDo('add_film'))
{
	echo $language_pack['is_not_promulgator'];
	exit;
}

$douban_id = $_GET['douban_id'];
include($gDOCUMENT_ROOT_SYSTEM.'subject/icp/'.$gICP.'.php');
if(empty($film_info))
{
	echo 'douban no';
}

include_once($gDOCUMENT_ROOT_SYSTEM.'include/spokenLanguageAction.php');
$spokenLanguageAction = new spokenLanguageAction();
include_once($gDOCUMENT_ROOT_SYSTEM.'include/countryAction.php');
$countryAction = new countryAction();
include_once($gDOCUMENT_ROOT_SYSTEM.'include/filmAction.php');
$filmAction = new filmAction();

$where = array('douban_id'=>$douban_id);
if($filmAction->isFilmExist($where))
{
	header("Location: ".addon::getMovieSubjectUrl($douban_id));
}

$country_id_and_name = $countryAction->getCountryIdAndName($user_agent['written_language_tag']);

include_once($gDOCUMENT_ROOT_SYSTEM.'include/copyrightAction.php');
$copyrightAction = new copyrightAction();
$copyright_id_and_name = $copyrightAction->getCopyrightIdAndName();

include_once($gDOCUMENT_ROOT_SYSTEM.'include/writtenLanguageAction.php');
$writtenLanguageAction = new writtenLanguageAction();
$written_language_tag_and_name = $writtenLanguageAction->getWrittenLanguageTagAndName();

$country_code_and_name = $countryAction->getCountryCodeAndName($user_agent['written_language_tag'],'en-US');
$spoken_language_id_and_name = $spokenLanguageAction->getSpokenLanguageIdAndName($user_agent['written_language_tag']);

$is_copyright_expired = film::$is_copyright_expired;




//输出模板
include($gDOCUMENT_ROOT_SYSTEM.'templates/'.$gTEMPLATE.'/html/new_subject.tpl');
?>
